package jsc.gui;

import jsc.gui.util.Vector;



public class Player {
	
	enum Team {Home, Visitor};
	
	private int id;
	private Vector pos;	//Relativa ao eixo
	private Vector s0;	//Relativa ao eixo
	private Vector v;
	private Vector vision;
	private double t0;
	private Team team;
	private int skill;
	private int accuracy;
	private int power;
	

	public Player(Vector pos) {
		this.pos = pos;
		this.s0 = pos;
		this.v = new Vector(5, 0);
		this.vision = new Vector(5, 0);
		this.power = 16;
		this.t0 = 0;
	}
	
	public Vector v() {
		return v;
	}
	
	public Vector s(double t) {
		return s0.add(v.prod(t - t0));
	}
	
	public double sx(double t) {
		return s(t).r();
	}
	
	public double sy(double t) {
		return s(t).i();
	}
	
	public void setTeam(Team team) {
		this.team = team;
	}
	
	public Vector direction() {
		return vision;
	}
	
	public void setVec(Vector v, double t) {
		this.s0 = s(t);
		this.t0 = t;
		this.v = v;
	}
	
	public int getAccuracy() {
		return accuracy;
	}

	public void setAccuracy(int accuracy) {
		this.accuracy = accuracy;
	}

	public int getPower() {
		return power;
	}

	public void setPower(int power) {
		this.power = power;
	}

	public Team getTeam() {
		return this.team;
	}
	
	public int getSkill() {
		return skill;
	}

	public void setSkill(int skill) {
		this.skill = skill;
	}

	public int getId() {
		return id;
	}

}
